package com.uzai.console.enums;

/**
 * 抖音平台订单状态状态
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum DyOrderPlatformStatusEnum {

    PAY_SUCC("PAY_SUCC","支付完成"),
    REFUND("REFUND","退款"),
    SETTLE("SETTLE","结算"),
    CONFIRM("CONFIRM","确认收货"),
    ;

    private String status;
    private String desc;

    DyOrderPlatformStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static DyOrderPlatformStatusEnum getByType(String status) {
        if (status == null) {
            return null;
        }
        for (DyOrderPlatformStatusEnum dyOrderPlatformStatusEnum: DyOrderPlatformStatusEnum.values()) {
            if (dyOrderPlatformStatusEnum.getStatus().equals(status)) {
                return dyOrderPlatformStatusEnum;
            }
        }
        return null;
    }
}
